;;;Place a detail bubble, single or multiple references.
;;;
;;;	AUTHOR: HENRY C. FRANCIS
;;;		425 N. ASHE ST.
;;;		SOUTHERN PINES, NC 28387
;;;              
;;;		All rights reserved without prejudice.
;;;
;;;	Copyright:	7-17-95
;;;	Edited:		2-10-2011
;;;
(DEFUN C:BUB ( / pt1 mp1 mp2 numb dimsc mpn bldsc clayr txht insang btype)
  (setq cmde (getvar"cmdecho"))
  (setvar "cmdecho" 0)
  (setvar "cecolor" "bylayer")
  (setq attdlg (getvar"attdia")
        clayr (getvar"clayer")
        ntwang (- 0(*(/(getvar"viewtwist")pi)180))
        txht (getvar"textsize")
        numb 0
        colr "1"
        modf "SYMB"
  );setq
  (if dimscl nil (load"dimscl"))
  (dimscl)
  (if gvpno nil (load"gvpno"))
  (gvpno)
  (if getstyle (getstyle "A")(progn (load "getstyle")(getstyle "A")))
  (IF set_mjrg NIL (LOAD "SET_MJRG" "\nFile SET_MJRG.LSP not loaded! "))
  (set_mjrg)
    (progn
      (if c:mklayr nil (load"mklayr"))
      (c:mklayr)
      (if (and mpb rcall) nil
        (setq mpb (getpoint "\nInsertion point of Bubble ? "))
      );if
      (if skipbt (setq btype skipbt))
      (setvar "attdia" 0)
      (setq colr "1" modf "SYMB")
      (c:mklayr)
      (if (and rcall (= btype "1"))
        nil
        (setq btype (ukword 1 "1 2 3 4 5 6 7 8" "1 reference or 2, 3, 4, 5, 6, 7, 8 ? " "1"))
      )
      (if (eq btype "1")
        (progn
          (command ".insert" "b1" mpb dimsc dimsc ntwang "" "" "")
          (command ".ddatte" "l")
        );progn
        (progn
          (setq colr "2")
          (c:mklayr)
          (setq sdis (* dimsc 0.375)
                pi90 (* pi 0.5)
                pi270 (* pi 1.5)
                thtb (* dimsc 0.175)
                tcob "4"
                thtr (* dimsc 0.125)
                tcor "6"
                ttpt (polar mpb pi90 (* dimsc 0.183))
                ljst (polar mpb pi (* dimsc 0.1875))
                rjst (polar mpb 0 (* dimsc 0.1875))
                barc (polar mpb pi270 sdis)
                earc (polar mpb pi sdis)
                rlin (polar mpb 0 sdis)
                1lln (polar barc pi sdis)
                1ltp (polar ljst pi270 (* dimsc 0.1875))
                1rtp (polar rjst pi270 (* dimsc 0.139))
          );setq
          (command ".arc" "c" mpb barc earc)
          (command ".line" earc rlin "")
          (setq colr "4"
                mdof "text")
          (c:mklayr)
          (command ".text" "mc" ttpt thtb 0 "?")
          (setq colr "6")
          (c:mklayr)
          (command ".text" "mc" 1rtp thtr 0 "?")
          (setq cntr 0)
          (while (>(atoi btype) cntr)
          (progn
            (setq colr "2")
            (c:mklayr)
            (command ".line" mpb barc 1lln earc "")
            (setq mpb (polar mpb pi270 sdis)
                  earc (polar earc pi270 sdis)
                  1lln (polar 1lln pi270 sdis)
                  barc (polar barc pi270 sdis)
            );setq
            (setq colr "6")
            (c:mklayr)
            (command ".text" "mc" 1ltp thtr 0 "?")
            (setq 1ltp (polar 1ltp pi270 sdis)
                  cntr (1+ cntr))
          );progn
          );while
        );progn
      );if
    );progn
  (setvar "clayer" clayr)
  (setvar "attdia" attdlg)
  (setvar "textsize" txht)
  (getstyle "")
  (setvar "cmdecho" cmde)
  (command)
);DEFUN C:BL
